import presetWeapp from 'unocss-preset-weapp'
import {transformerAttributify, transformerClass} from 'unocss-preset-weapp/transformer'
import {defineConfig} from "unocss";

export default defineConfig({
    presets: [
        // @ts-ignore
        presetWeapp({
            prefix: '' // 自定义前缀
        }),
    ],
    rules: [ // 自定义规则
        ['nowrap', {'white-space': 'nowrap'}]
    ],
    shortcuts: [
        { // 自定义快捷方式
            'flex-center': 'flex justify-center items-center',
            'flex-between': 'flex justify-between items-center',
            'flex-around': 'flex justify-around items-center',
        },
    ],

    transformers: [
        // @ts-ignore
        transformerAttributify(),
        // @ts-ignore
        transformerClass(),
    ],
})